Skip to content

feat(lab3): SSH signing + gitleaks pre-commit#1260

Open
err0r522 wants to merge 3 commits into
inno-devops-labs:mainfrom
err0r522:feature/lab3
Open

feat(lab3): SSH signing + gitleaks pre-commit#1260
err0r522 wants to merge 3 commits into
inno-devops-labs:mainfrom
err0r522:feature/lab3

Conversation

@err0r522

@err0r522 err0r522 commented Jun 26, 2026

Copy link
Copy Markdown

Goal

Configure SSH commit signing to prevent repudiation and gitleaks as a pre-commit hook to prevent leaks before they enter the repository.

Changes

  • Generated an SSH key and added it to Github as a Signing Key.
  • Configured Git to use SSH for signing every commit.
  • Added .pre-commit-config.yaml with the gitleaks hook (rev v8.24.2) and additional hooks from pre-commit/pre-commit-hooks.
  • Installed pre-commit framework and ran pre-commit install.
  • Added submissions/lab3.md.

Testing

# Verify SSH signing works locally
git log --show-signature -1

# Verify the pre-commit hook is active
python -m pre-commit run --all-files
# It reacted to a configuration file in lab 6 that had a private key in plain text.

# Test that gitleaks blocks a fake secret
cat > /tmp/leak-test.txt <<EOF
# This is a deliberate fake secret for Lab 3 testing
GH_PAT=ghp_16C7e42F292c6912E7710c838347Ae178B4a
EOF
cp /tmp/leak-test.txt submissions/leak-attempt.txt
git add submissions/leak-attempt.txt
git commit -m "test: should be blocked by gitleaks"

# To undo the last test.
git restore --staged submissions/leak-attempt.txt
rm submissions/leak-attempt.txt /tmp/leak-test.txt

Artifacts & Screenshots

изображение

Checklist

  • Title is clear (feat(labN): <topic> style)
  • No secrets/large temp files committed
  • Submission file at submissions/labN.md exists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant